package com.shidaimanong.demo.calc;

/**
 * 学编程，关注：十代码农
 * 抖音、快手、B站、西瓜视频、今日头条
 */
public class CalcDemo5 {
    public static void main(String[] args) {
        int x = 10;
        int y = 20;
        int z = 0;
        z = x + y;
        System.out.println("z = x + y = " + z);
        z += x;
        System.out.println("z += x  = " + z);
        z -= x;
        System.out.println("z -= x = " + z);
        z *= x;
        System.out.println("z *= x = " + z);
        x = 10;
        z = 15;
        z /= x;
        System.out.println("z /= x = " + z);
        x = 10;
        z = 15;
        z %= x;
        System.out.println("z %= x  = " + z);
        z <<= 2;
        System.out.println("z <<= 2 = " + z);
        z >>= 2;
        System.out.println("z >>= 2 = " + z);
        z >>= 2;
        System.out.println("z >>= 2 = " + z);
        z &= x;
        System.out.println("z &= x  = " + z);
        z ^= x;
        System.out.println("z ^= x   = " + z);
        z |= x;
        System.out.println("z |= x   = " + z);
    }
}